package com.tidc.seaserverservice.service.impl;

import com.tidc.seaservermapper.dao.UserDao;
import com.tidc.seaservermodel.dto.UserDto;
import com.tidc.seaservermodel.entity.Fres;
import com.tidc.seaserverservice.service.SecondaryUserService;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ：冯涛滔
 * @date ：Created in 2020/9/21 16:43
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class SecondaryUserServiceImpl implements SecondaryUserService {
    @Resource
    private UserDao userDao;
    @Override
    public Fres<UserDto> getUserInfo(Authentication authentication) {
        return Fres.Success(userDao.getUserInfo(Integer.parseInt(authentication.getName())), "");
    }
}
